feat: add disableDefaultRules option to ModeConfig#11614
Draft
roomote[bot] wants to merge 2 commits intomainfrom
Draft
feat: add disableDefaultRules option to ModeConfig#11614roomote[bot] wants to merge 2 commits intomainfrom
roomote[bot] wants to merge 2 commits intomainfrom
Conversation
Adds a new optional `disableDefaultRules` boolean field to the ModeConfig
schema. When set to true on a custom mode, only mode-specific rules
(.roo/rules-{mode}/) are loaded -- generic/default rules (.roo/rules/,
AGENTS.md, .roorules, .clinerules) are skipped.
This addresses the need for focused modes that should not inherit the
default rule set, reducing rule noise and improving model adherence.
Changes:
- packages/types/src/mode.ts: Add disableDefaultRules to modeConfigSchema
- src/core/prompts/sections/custom-instructions.ts: Respect the flag
- src/core/prompts/system.ts: Thread the flag from mode config
- webview-ui: Add UI toggle for custom modes
- Tests: Schema validation and addCustomInstructions behavior
Closes #11611
2 tasks
|
@roomote create translations required for check-translation ci |
Contributor
Author
Added |
Contributor
Author
|
All translations for the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR attempts to address Issue #11611. Feedback and guidance are welcome.
Summary
Adds a new optional
disableDefaultRulesboolean field to theModeConfigschema. When set totrueon a custom mode, only mode-specific rules (.roo/rules-{mode}/) are loaded. Default/generic rules (.roo/rules/,AGENTS.md,.roorules,.clinerules) are skipped.Usage
In
custom_modes.yaml:Or via the UI toggle in the mode settings panel for custom modes.
Changes
packages/types/src/mode.ts: AddeddisableDefaultRules: z.boolean().optional()tomodeConfigSchemasrc/core/prompts/sections/custom-instructions.ts: UpdatedaddCustomInstructions()to accept and respect the new flag -- when true, skips AGENTS.md and generic rulessrc/core/prompts/system.ts: ThreadsmodeConfig.disableDefaultRulesintoaddCustomInstructions()optionswebview-ui/src/components/modes/ModesView.tsx: Added a checkbox toggle for custom modeswebview-ui/src/i18n/locales/en/prompts.json: Added localization keys for the new toggleaddCustomInstructionsbehavior testsBenefits
false(current behavior preserved)custom_modes.yamland.roomodesproject-level configsCloses #11611
Start a new Roo Code Cloud session on this branch